int Cmp(const void* p1, const void* p2)
{
	return *(int*)p1 - *(int*)p2;
}
int findMaxConsecutiveOnes(int* nums, int numsSize) 
{
	int tmp[10000];
	int i, count, x, max;
	x = 0;
	count = 0;
	for (i = 0; i < numsSize; i++)
	{
		if (nums[i] == 0){
			tmp[x] = count;
			x++;
			count = 0;
		}
		if (nums[i] == 1) {
			count++;
		}
	}
	if (x==0)
		return count;
	qsort(tmp, x, 4, Cmp);
	max = (count > tmp[x - 1] ? count : tmp[x - 1]);
	return max;
}